if redis.call("EXISTS", KEYS[1]) == 1 then
    local payload = redis.call("GET", KEYS[1])
    if redis.call("EXISTS", payload) == 1 then
        return redis.call("GET",payload)
    else
        return nil
    end
else
    return nil
end

-- redis-cli -a password --eval get.lua key1